#pragma once

#include <stdlib.h>
#include <Windows.h>
#include <WindowsX.h>

#include <iostream>
using namespace std;

#include <d3d9.h>
#include <d3dx9.h>
/*
Consist of various declarations to the actual methods contained in Direct3D library
*/


#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "d3dx9.lib")
/*
With this, we are writing a comment to the compiler
indicating that we want to add a library file project
with the specific name "d3d9.lib"
*/

extern int mains;

#define SAFE_RELEASE(x) if(x){x->Release(); x = 0;}

struct GameArt
{
private:
	ID3DXSprite*		m_sprite;
	IDirect3DTexture9*	m_texture;
	D3DXIMAGE_INFO		m_imageInfo;

	D3DXVECTOR3 m_position, m_scaling;
	float m_angle;

	D3DXVECTOR3 m_center;

	
public:
	GameArt();
	~GameArt();

	void Create(//IDirect3DDevice9* device, 
				char* file, 
				D3DXVECTOR3 position, 
				D3DXVECTOR3 scale, 
				float angle);
	void Draw(RECT);
	void Shutdown();

	ID3DXSprite*		getSprite();
	IDirect3DTexture9*	getTexture();
	D3DXIMAGE_INFO		getImageInfo();
	D3DXVECTOR3			getPos();
	D3DXVECTOR3			getScale();
	float				getAngle();
	D3DXVECTOR3			getCenter();
	D3DXIMAGE_INFO		getInfo();

	void				setPos(D3DXVECTOR3 value);
	void				setScale(D3DXVECTOR3 value);
	void				setAngle(float value);

};